//代码演练场
import { TreeNode, outTree, treeToDom } from './utils/treeUtil.js';
import { ListNode, listToArr } from './utils/listUtil.js';
console.clear();
console.log('\n\n————————————————————————————————————————————————————————————————\n\n');
// const treeData = buildTree([8, 3, 10, 1, 6, null, 14, null, null, 4, 7, 13])
/** 代码运行结果 */
const _res = (function test() {
    var a = { n: 1 };
    var b = a;
    //@ts-ignore
    a.x = a = { n: 2 };
    //@ts-ignore
    console.log(a.x);
    //@ts-ignore
    console.log(b.x);
})();
_res != undefined && console.log("\n最终结果为 ", _res, "\n");
(_res === null || _res === void 0 ? void 0 : _res.constructor) === TreeNode && console.log('二叉树数组为', treeToDom(outTree(_res), 'tree2')); //返回结果是二叉树时才打印
(_res === null || _res === void 0 ? void 0 : _res.constructor) === ListNode && console.log('链表数组为', listToArr(_res)); //返回结果是链表时才打印
/**用于让根目录的 index.ts 与本文件链接 */
export default _res;
